﻿using System;
using System.Collections.Generic;
using Character;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

// Token: 0x02000181 RID: 385
public class Config : MonoBehaviour
{
	// Token: 0x060009F6 RID: 2550 RVA: 0x0003A018 File Offset: 0x00038218
	private void Start()
	{
		this.gameCtrl = UnityEngine.Object.FindObjectOfType<GameControl>();
		this.imageEffectChanger = UnityEngine.Object.FindObjectOfType<ImageEffectConfigChanger>();
		this.illusionCamera = UnityEngine.Object.FindObjectOfType<IllusionCamera>();
		if (this.tabMains.Length != this.tabs.Length)
		{
			GlobalData.Debug_LogError("标签的数量不合适");
			return;
		}
		Transform parent = this.tabMains[0].transform.Find("Column_L");
		Transform parent2 = this.tabMains[0].transform.Find("Column_R");
		this.showFocusUI = this.CreateSwitchUI(parent, "注視点表示", "カメラの注視点の表示を設定します", ConfigData.showFocusUI);
		this.centerDrgaAct = this.CreateDropDownUI(parent, "中ドラッグ動作", "中ドラッグ時の動作を設定します\u3000もう片方が左右ボタンドラッグの動作になります", (int)ConfigData.centerDragMove, new string[]
		{
			"上下左右移動",
			"前後左右移動"
		});
		this.cameraTurnSpeed = this.CreateInputSliderUI(parent, "回転速度", "カメラの回転速度を設定します", ConfigData.cameraTurnSpeed, 0.2f, 4f, true, 1f);
		this.cameraMoveSpeed = this.CreateInputSliderUI(parent, "移動速度", "カメラの移動速度を設定します", ConfigData.cameraMoveSpeed, 0.2f, 4f, true, 1f);
		this.mouseSensitive = this.CreateInputSliderUI(parent, "マウス感度", "マウスによるカメラ操作感度を設定します", ConfigData.mouseSensitive, 0.2f, 4f, true, 1f);
		this.mouseRevV = this.CreateSwitchUI(parent, "マウス上下反転", "マウスによるカメラ操作の上下を反転します", ConfigData.mouseRevV);
		this.mouseRevH = this.CreateSwitchUI(parent, "マウス左右反転", "マウスによるカメラ操作の左右を反転します", ConfigData.mouseRevH);
		this.dragLock = this.CreateSwitchUI(parent, "ドラッグ中のカーソル固定", "ドラッグ中にカーソル位置が移動しないようにします", ConfigData.dragLock);
		this.keySensitive = this.CreateInputSliderUI(parent, "キー感度", "キー入力によるカメラ操作感度を設定します", ConfigData.keySensitive, 0.2f, 4f, true, 1f);
		this.keyRevV = this.CreateSwitchUI(parent, "キー上下反転", "キー入力によるカメラ操作の上下を反転します", ConfigData.keyRevV);
		this.keyRevH = this.CreateSwitchUI(parent, "キー左右反転", "キー入力によるカメラ操作の左右を反転します", ConfigData.keyRevH);
		this.parse = this.CreateInputSliderUI(parent, "デフォルトパース", "基本となる視野角の角度を設定します", ConfigData.defParse, 10f, 90f, true, 25f);
		this.h_camReset_Position = this.CreateSwitchUI(parent2, "位置変更時のリセット", "H中の位置変更時にカメラをリセットします", ConfigData.h_camReset_position);
		this.h_camReset_Style = this.CreateSwitchUI(parent2, "体位変更時のリセット", "H中の体位変更時にカメラをリセットします", ConfigData.h_camReset_style);
		Transform parent3 = this.tabMains[1].transform.Find("Column_L");
		Transform parent4 = this.tabMains[1].transform.Find("Column_R");
		this.showFPS = this.CreateSwitchUI(parent3, "FPS表示", "1秒間のゲームの描画数を画面に表示します", ConfigData.showFPS);
		this.autoHideObstacle = this.CreateSwitchUI(parent3, "遮蔽物を自動非表示", "マップ上のオブジェクトが邪魔になる場合に自動的に非表示にします", ConfigData.autoHideObstacle);
		this.showMob = this.CreateSwitchUI(parent3, "観衆の表示", "観衆がいる場合の表示を切り替えます", ConfigData.showMob);
		this.showMirror = this.CreateSwitchUI(parent3, "鏡の映り込み", "鏡に実際の風景が映り込みます\u3000無効にすると処理負荷が軽減します", ConfigData.showMirror);
		this.backLight = this.CreateInputSliderUI(parent3, "バックライトの強さ", "常にカメラから見てキャラクターの後ろから当てるライトの強さを設定します", ConfigData.backLightIntensity, 0f, 1f, true, 0.8f);
		this.maleColor = this.CreateColorChangeButton(parent4, "男のシルエット表示時の色", "男の表示をシルエットのみにした場合の色を設定します", ConfigData.maleColor, true, delegate(Color color)
		{
			ConfigData.maleColor = color;
		});
		this.customHighlight = this.CreateSwitchUI(parent4, "キャラカスタム部位の表示", "カスタム時にスライダーが影響を与える部位をキャラに表示します", ConfigData.showCustomHighlight);
		this.h_action_continue = this.CreateSwitchUI(parent4, "H行為の継続", "同じタイプのH行為の場合、体位を変更しても行為を継続します", ConfigData.h_action_continue);
		int val2 = 0;
		for (int i = 0; i < this.ThumbsCacheSizeList.Length; i++)
		{
			if (ConfigData.thumbsCacheSizeMB == this.ThumbsCacheSizeList[i])
			{
				val2 = i;
				break;
			}
		}
		this.dropThumbsCacheSize = this.CreateDropDownUI(parent4, "サムネイルキャッシュサイズ", "アップローダーのサムネイル読み込みの高速化の為にPCに保存する最大容量を指定します", val2, this.ThumbsCacheNameList);
		Transform parent5 = this.tabMains[2].transform.Find("Column_L");
		Transform parent6 = this.tabMains[2].transform.Find("Column_R");
		string[] options = new string[]
		{
			"オススメ",
			"薄め",
			"濃厚"
		};
		this.dropFlavor = this.CreateDropDownUI(parent5, "雰囲気", "ゲーム世界の色合いの雰囲気を設定します", ConfigData.postProcessFlavor - 1, options);
		this.CreateSpace(parent5);
		this.switchEyeAdaptation = this.CreateSwitchUI(parent5, "自動露光", "自動で暗いシーンを明るく、明るいシーンを暗く調整します", ConfigData.eyeAdaptationEnable);
		this.sliderExposureCompensation = this.CreateInputSliderUI(parent5, "明るさ", "自動露光の基準となる明るさを設定します", ConfigData.exposureCompensation, 0f, 1f, true, 0.5f);
		this.CreateSpace(parent5);
		this.switchBloom = this.CreateSwitchUI(parent5, "ブルーム", "明るい光の拡散を表現します", ConfigData.bloomEnable);
		this.sliderBloom = this.CreateInputSliderUI(parent5, "強さ", "ブルームの強さを調整します", ConfigData.bloomRate, 0f, 2f, true, 1f);
		this.switchDirt = this.CreateSwitchUI(parent5, "レンズの汚れ", "ブルーム効果にレンズの汚れを加味します", ConfigData.lensDirtEnable);
		this.CreateSpace(parent5);
		this.switchVignette = this.CreateSwitchUI(parent5, "ビネット", "画面端を暗くします", ConfigData.vignetteEnable);
		this.sliderVignette = this.CreateInputSliderUI(parent5, "強さ", "ビネットの強さを調整します", ConfigData.vignetteRate, 0f, 2f, true, 1f);
		this.switchNoise = this.CreateSwitchUI(parent6, "ノイズ", "画面にノイズエフェクトを施します", ConfigData.noiseEnable);
		this.sliderNoise = this.CreateInputSliderUI(parent6, "強さ", "ノイズの強さを調整します", ConfigData.noiseRate, 0f, 2f, true, 1f);
		this.CreateSpace(parent6);
		this.switchSSAO = this.CreateSwitchUI(parent6, "SSAO", "物体の陰影を強調します", ConfigData.ssaoEnable);
		this.sliderSSAOIntensity = this.CreateInputSliderUI(parent6, "強さ", "SSAOの強さを調節します", ConfigData.ssaoIntensity, 0f, 2f, true, 1f);
		this.sliderSSAORadius = this.CreateInputSliderUI(parent6, "範囲", "SSAOの範囲を調節します", ConfigData.ssaoRadius, 0f, 2f, true, 1f);
		this.CreateSpace(parent6);
		this.switchDOF = this.CreateSwitchUI(parent6, "被写界深度", "カメラの注視点から離れた物体はぼけるようになります", ConfigData.dofEnable);
		this.sliderDOF = this.CreateInputSliderUI(parent6, "強さ", "被写界深度の強さを調整します", ConfigData.dofRate, 0f, 1f, true, 0.7f);
		Transform parent7 = this.tabMains[3].transform.Find("Column_L");
		this.masterVol = this.CreateInputSliderUI(parent7, "音量:マスター", "すべての音の音量を調整します", ConfigData.volume_master, 0f, 1f, false, 0.75f);
		this.CreateSpace(parent7);
		this.bgmVol = this.CreateInputSliderUI(parent7, "音量:BGM", "BGMの音量を設定します", ConfigData.volume_bgm, 0f, 1f, false, 0.3f);
		this.seVol = this.CreateInputSliderUI(parent7, "音量:システム音", "システム音の音量を設定します", ConfigData.volume_system, 0f, 1f, false, 1f);
		this.hseVol = this.CreateInputSliderUI(parent7, "音量:効果音", "効果音の音量を設定します", ConfigData.volume_se, 0f, 1f, false, 1f);
		this.envVol = this.CreateInputSliderUI(parent7, "音量:環境音", "環境音の音量を設定します", ConfigData.volume_env, 0f, 1f, false, 1f);
		this.CreateSpace(parent7);
		this.reverb = this.CreateSwitchUI(parent7, "音響効果", "反響などの音響効果の有無を設定します", ConfigData.reverb_flag);
		Transform parent8 = this.tabMains[3].transform.Find("Column_R");
		this.voiceAllVol = this.CreateInputSliderUI(parent8, "音量:音声", "全員の音声の音量を調整します", ConfigData.volume_voiceAll, 0f, 1f, false, 1f);
		this.CreateSpace(parent8);
		this.ritsukoVol = this.CreateInputSliderUI(parent8, "音量:律子", "律子の音量を設定します", ConfigData.volume_voiceRitsuko, 0f, 1f, false, 1f);
		this.ritsukoPitch = this.CreateInputSliderUI(parent8, "高低:律子", "律子の声の高低を設定します", ConfigData.pitch_voiceRitsuko, -1f, 1f, true, 0f);
		this.akikoVol = this.CreateInputSliderUI(parent8, "音量:明子", "明子の音量を設定します", ConfigData.volume_voiceAkiko, 0f, 1f, false, 1f);
		this.akikoPitch = this.CreateInputSliderUI(parent8, "高低:明子", "明子の声の高低を設定します", ConfigData.pitch_voiceAkiko, -1f, 1f, true, 0f);
		this.yukikoVol = this.CreateInputSliderUI(parent8, "音量:雪子", "雪子の音量を設定します", ConfigData.volume_voiceYukiko, 0f, 1f, false, 1f);
		this.yukikoPitch = this.CreateInputSliderUI(parent8, "高低:雪子", "雪子の声の高低を設定します", ConfigData.pitch_voiceYukiko, -1f, 1f, true, 0f);
		this.marikoVol = this.CreateInputSliderUI(parent8, "音量:真理子", "真理子の音量を設定します", ConfigData.volume_voiceMariko, 0f, 1f, false, 1f);
		this.marikoPitch = this.CreateInputSliderUI(parent8, "高低:真理子", "真理子の高低を設定します", ConfigData.pitch_voiceMariko, -1f, 1f, true, 0f);
		this.CreateSpace(parent7);
		this.heroVol = this.CreateInputSliderUI(parent7, "音量:主人公", "主人公の音量を設定します", ConfigData.volume_voiceHero, 0f, 1f, false, 1f);
		this.heroPitch = this.CreateInputSliderUI(parent7, "高低:主人公", "主人公の声の高低を設定します", ConfigData.pitch_voiceHero, -1f, 1f, true, 0f);
		this.kouichiVol = this.CreateInputSliderUI(parent7, "音量:広一", "広一の音量を設定します", ConfigData.volume_voiceKouichi, 0f, 1f, false, 1f);
		this.kouichiPitch = this.CreateInputSliderUI(parent7, "高低:広一", "広一の声の高低を設定します", ConfigData.pitch_voiceKouichi, -1f, 1f, true, 0f);
		this.mobVol = this.CreateInputSliderUI(parent7, "音量:観衆", "観衆の音量を設定します", ConfigData.volume_voiceMob, 0f, 1f, false, 1f);
		this.ritsukoVol.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.RITSUKO);
		});
		this.ritsukoPitch.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.RITSUKO);
		});
		this.akikoVol.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.AKIKO);
		});
		this.akikoPitch.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.AKIKO);
		});
		this.yukikoVol.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.YUKIKO);
		});
		this.yukikoPitch.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.YUKIKO);
		});
		this.marikoVol.AddOnChangeAction(delegate(float x)
		{
			this.VoiceOnChange(Config.SAMPLE.MARIKO);
		});
		this.marikoPitch.AddOnChangeAction(delegate(float x)
		{
			this.VoiceOnChange(Config.SAMPLE.MARIKO);
		});
		this.heroVol.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.HERO);
		});
		this.heroPitch.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.HERO);
		});
		this.kouichiVol.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.KOUICHI);
		});
		this.kouichiPitch.AddOnChangeAction(delegate(float val)
		{
			this.VoiceOnChange(Config.SAMPLE.KOUICHI);
		});
		for (int j = 0; j < this.tabs.Length; j++)
		{
			this.tabMains[j].SetActive(false);
		}
		this.nowPlaySample = Config.SAMPLE.NONE;
	}

	// Token: 0x060009F7 RID: 2551 RVA: 0x0003ABD4 File Offset: 0x00038DD4
	private void OnEnable()
	{
		this.UpdateFromShortCut();
	}

	// Token: 0x060009F8 RID: 2552 RVA: 0x0003ABDC File Offset: 0x00038DDC
	private void Update()
	{
		for (int i = 0; i < this.tabs.Length; i++)
		{
			this.tabMains[i].SetActive(this.tabs[i].isOn);
		}
		ConfigData.showFocusUI = this.showFocusUI.Value;
		ConfigData.centerDragMove = (IllusionCamera.CenterDragMove)this.centerDrgaAct.Value;
		ConfigData.cameraTurnSpeed = this.cameraTurnSpeed.Value;
		ConfigData.cameraMoveSpeed = this.cameraMoveSpeed.Value;
		ConfigData.mouseSensitive = this.mouseSensitive.Value;
		ConfigData.mouseRevV = this.mouseRevV.Value;
		ConfigData.mouseRevH = this.mouseRevH.Value;
		ConfigData.dragLock = this.dragLock.Value;
		ConfigData.keySensitive = this.keySensitive.Value;
		ConfigData.keyRevV = this.keyRevV.Value;
		ConfigData.keyRevH = this.keyRevH.Value;
		ConfigData.showFPS = this.showFPS.Value;
		ConfigData.autoHideObstacle = this.autoHideObstacle.Value;
		ConfigData.showMob = this.showMob.Value;
		ConfigData.showMirror = this.showMirror.Value;
		ConfigData.backLightIntensity = this.backLight.Value;
		ConfigData.showCustomHighlight = this.customHighlight.Value;
		ConfigData.h_camReset_position = this.h_camReset_Position.Value;
		ConfigData.h_camReset_style = this.h_camReset_Style.Value;
		ConfigData.h_action_continue = this.h_action_continue.Value;
		ConfigData.thumbsCacheSizeMB = this.ThumbsCacheSizeList[this.dropThumbsCacheSize.Value];
		this.Update_PostEffects();
		ConfigData.volume_master = this.masterVol.Value;
		ConfigData.volume_bgm = this.bgmVol.Value;
		ConfigData.volume_system = this.seVol.Value;
		ConfigData.volume_se = this.hseVol.Value;
		ConfigData.volume_env = this.envVol.Value;
		ConfigData.reverb_flag = this.reverb.Value;
		ConfigData.volume_voiceAll = this.voiceAllVol.Value;
		ConfigData.volume_voiceRitsuko = this.ritsukoVol.Value;
		ConfigData.volume_voiceAkiko = this.akikoVol.Value;
		ConfigData.volume_voiceYukiko = this.yukikoVol.Value;
		ConfigData.volume_voiceHero = this.heroVol.Value;
		ConfigData.volume_voiceKouichi = this.kouichiVol.Value;
		ConfigData.volume_voiceMob = this.mobVol.Value;
		ConfigData.pitch_voiceRitsuko = this.ritsukoPitch.Value;
		ConfigData.pitch_voiceAkiko = this.akikoPitch.Value;
		ConfigData.pitch_voiceYukiko = this.yukikoPitch.Value;
		ConfigData.pitch_voiceHero = this.heroPitch.Value;
		ConfigData.pitch_voiceKouichi = this.kouichiPitch.Value;
		ConfigData.volume_voiceMariko = this.marikoVol.Value;
		ConfigData.pitch_voiceMariko = this.marikoPitch.Value;
		this.UpdateVoice();
		if (ConfigData.defParse != this.parse.Value)
		{
			ConfigData.defParse = this.parse.Value;
			if (this.illusionCamera != null)
			{
				this.illusionCamera.SetParse(ConfigData.defParse, true);
			}
		}
		this.Update_Input();
	}

	// Token: 0x060009F9 RID: 2553 RVA: 0x0003AF0C File Offset: 0x0003910C
	private void Update_PostEffects()
	{
		bool flag = false;
		if (ConfigData.postProcessFlavor != this.dropFlavor.Value + 1)
		{
			flag |= true;
		}
		if (ConfigData.eyeAdaptationEnable != this.switchEyeAdaptation.Value)
		{
			flag |= true;
		}
		if (ConfigData.exposureCompensation != this.sliderExposureCompensation.Value)
		{
			flag |= true;
		}
		if (ConfigData.bloomEnable != this.switchBloom.Value)
		{
			flag |= true;
		}
		if (ConfigData.bloomRate != this.sliderBloom.Value)
		{
			flag |= true;
		}
		if (ConfigData.lensDirtEnable != this.switchDirt.Value)
		{
			flag |= true;
		}
		if (ConfigData.vignetteEnable != this.switchVignette.Value)
		{
			flag |= true;
		}
		if (ConfigData.vignetteRate != this.sliderVignette.Value)
		{
			flag |= true;
		}
		if (ConfigData.noiseEnable != this.switchNoise.Value)
		{
			flag |= true;
		}
		if (ConfigData.noiseRate != this.sliderNoise.Value)
		{
			flag |= true;
		}
		if (ConfigData.ssaoEnable != this.switchSSAO.Value)
		{
			flag |= true;
		}
		if (ConfigData.ssaoIntensity != this.sliderSSAOIntensity.Value)
		{
			flag |= true;
		}
		if (ConfigData.ssaoRadius != this.sliderSSAORadius.Value)
		{
			flag |= true;
		}
		if (ConfigData.dofEnable != this.switchDOF.Value)
		{
			flag |= true;
		}
		if (ConfigData.dofRate != this.sliderDOF.Value)
		{
			flag |= true;
		}
		if (flag)
		{
			ConfigData.postProcessFlavor = this.dropFlavor.Value + 1;
			ConfigData.eyeAdaptationEnable = this.switchEyeAdaptation.Value;
			ConfigData.exposureCompensation = this.sliderExposureCompensation.Value;
			ConfigData.bloomEnable = this.switchBloom.Value;
			ConfigData.bloomRate = this.sliderBloom.Value;
			ConfigData.lensDirtEnable = this.switchDirt.Value;
			ConfigData.vignetteEnable = this.switchVignette.Value;
			ConfigData.vignetteRate = this.sliderVignette.Value;
			ConfigData.noiseEnable = this.switchNoise.Value;
			ConfigData.noiseRate = this.sliderNoise.Value;
			ConfigData.ssaoEnable = this.switchSSAO.Value;
			ConfigData.ssaoIntensity = this.sliderSSAOIntensity.Value;
			ConfigData.ssaoRadius = this.sliderSSAORadius.Value;
			ConfigData.dofEnable = this.switchDOF.Value;
			ConfigData.dofRate = this.sliderDOF.Value;
			if (this.imageEffectChanger != null)
			{
				this.imageEffectChanger.ChangeConfig();
			}
		}
	}

	// Token: 0x060009FA RID: 2554 RVA: 0x0003B1A8 File Offset: 0x000393A8
	private void UpdateVoice()
	{
		if (this.nowPlaySample == Config.SAMPLE.RITSUKO)
		{
			this.sampleVoice.volume = ConfigData.VolumeVoice_Ritsuko();
			this.sampleVoice.pitch = ConfigData.PitchVoice_Ritsuko();
		}
		else if (this.nowPlaySample == Config.SAMPLE.AKIKO)
		{
			this.sampleVoice.volume = ConfigData.VolumeVoice_Akiko();
			this.sampleVoice.pitch = ConfigData.PitchVoice_Akiko();
		}
		else if (this.nowPlaySample == Config.SAMPLE.YUKIKO)
		{
			this.sampleVoice.volume = ConfigData.VolumeVoice_Yukiko();
			this.sampleVoice.pitch = ConfigData.PitchVoice_Yukiko();
		}
		else if (this.nowPlaySample == Config.SAMPLE.HERO)
		{
			this.sampleVoice.volume = ConfigData.VolumeVoice_Hero();
			this.sampleVoice.pitch = ConfigData.PitchVoice_Hero();
		}
		else if (this.nowPlaySample == Config.SAMPLE.KOUICHI)
		{
			this.sampleVoice.volume = ConfigData.VolumeVoice_Kouichi();
			this.sampleVoice.pitch = ConfigData.PitchVoice_Kouichi();
		}
		else if (this.nowPlaySample == Config.SAMPLE.MOB)
		{
			this.sampleVoice.volume = ConfigData.VolumeVoice_Mob();
			this.sampleVoice.pitch = 1f;
		}
		else if (this.nowPlaySample == Config.SAMPLE.MARIKO)
		{
			this.sampleVoice.volume = ConfigData.VolumeVoice_Mariko();
			this.sampleVoice.pitch = ConfigData.PitchVoice_Mariko();
		}
	}

	// Token: 0x060009FB RID: 2555 RVA: 0x0003B308 File Offset: 0x00039508
	private void Update_Input()
	{
		if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject != null)
		{
			return;
		}
		if (Input.GetKeyDown(KeyCode.F1))
		{
			this.Close();
		}
	}

	// Token: 0x060009FC RID: 2556 RVA: 0x0003B348 File Offset: 0x00039548
	private SwitchUI CreateSwitchUI(Transform parent, string title, string detail, bool val)
	{
		SwitchUI switchUI = UnityEngine.Object.Instantiate<SwitchUI>(this.switchOriginal);
		switchUI.SetTitle(title);
		switchUI.SetValue(val);
		EventTrigger eventTrigger = switchUI.GetEventTrigger();
		EventTrigger.Entry entry = new EventTrigger.Entry();
		entry.eventID = EventTriggerType.PointerEnter;
		entry.callback.AddListener(delegate(BaseEventData data)
		{
			this.SetDetailText(detail);
		});
		eventTrigger.triggers.Add(entry);
		switchUI.transform.SetParent(parent, false);
		return switchUI;
	}

	// Token: 0x060009FD RID: 2557 RVA: 0x0003B3CC File Offset: 0x000395CC
	private InputSliderUI CreateInputSliderUI(Transform parent, string title, string detail, float val, float min, float max, bool hasDef = false, float defVal = 0f)
	{
		InputSliderUI inputSliderUI = UnityEngine.Object.Instantiate<InputSliderUI>(this.sliderOriginal);
		inputSliderUI.SetTitle(title);
		inputSliderUI.Setup(min, max, hasDef, defVal);
		inputSliderUI.SetValue(val);
		EventTrigger eventTrigger = inputSliderUI.GetEventTrigger();
		EventTrigger.Entry entry = new EventTrigger.Entry();
		entry.eventID = EventTriggerType.PointerEnter;
		entry.callback.AddListener(delegate(BaseEventData data)
		{
			this.SetDetailText(detail);
		});
		eventTrigger.triggers.Add(entry);
		inputSliderUI.transform.SetParent(parent, false);
		return inputSliderUI;
	}

	// Token: 0x060009FE RID: 2558 RVA: 0x0003B45C File Offset: 0x0003965C
	private DropDownUI CreateDropDownUI(Transform parent, string title, string detail, int val, string[] options)
	{
		DropDownUI dropDownUI = UnityEngine.Object.Instantiate<DropDownUI>(this.dropdownOriginal);
		dropDownUI.SetTitle(title);
		List<Dropdown.OptionData> list = new List<Dropdown.OptionData>();
		foreach (string text in options)
		{
			list.Add(new Dropdown.OptionData(text));
		}
		dropDownUI.SetList(list);
		dropDownUI.SetValue(val);
		EventTrigger eventTrigger = dropDownUI.GetEventTrigger();
		EventTrigger.Entry entry = new EventTrigger.Entry();
		entry.eventID = EventTriggerType.PointerEnter;
		entry.callback.AddListener(delegate(BaseEventData data)
		{
			this.SetDetailText(detail);
		});
		eventTrigger.triggers.Add(entry);
		dropDownUI.transform.SetParent(parent, false);
		return dropDownUI;
	}

	// Token: 0x060009FF RID: 2559 RVA: 0x0003B520 File Offset: 0x00039720
	private ColorChangeButton CreateColorChangeButton(Transform parent, string title, string detail, Color color, bool hasAlpha, Action<Color> act)
	{
		ColorChangeButton colorChangeButton = UnityEngine.Object.Instantiate<ColorChangeButton>(this.colorChangeOriginal);
		colorChangeButton.Setup(title, color, hasAlpha, act);
		EventTrigger eventTrigger = colorChangeButton.GetEventTrigger();
		EventTrigger.Entry entry = new EventTrigger.Entry();
		entry.eventID = EventTriggerType.PointerEnter;
		entry.callback.AddListener(delegate(BaseEventData data)
		{
			this.SetDetailText(detail);
		});
		eventTrigger.triggers.Add(entry);
		colorChangeButton.transform.SetParent(parent, false);
		return colorChangeButton;
	}

	// Token: 0x06000A00 RID: 2560 RVA: 0x0003B5A0 File Offset: 0x000397A0
	private GameObject CreateSpace(Transform parent)
	{
		GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(this.spaceOriginal);
		gameObject.transform.SetParent(parent, false);
		return gameObject;
	}

	// Token: 0x06000A01 RID: 2561 RVA: 0x0003B5C8 File Offset: 0x000397C8
	public void SetDetailText(string str)
	{
		this.detailText.text = str;
	}

	// Token: 0x06000A02 RID: 2562 RVA: 0x0003B5D8 File Offset: 0x000397D8
	public void Close()
	{
		base.gameObject.SetActive(false);
		this.gameCtrl.audioCtrl.Play2DSE(this.gameCtrl.audioCtrl.systemSE_close);
	}

	// Token: 0x06000A03 RID: 2563 RVA: 0x0003B608 File Offset: 0x00039808
	private void VoiceOnChange(Config.SAMPLE chara)
	{
		bool flag = false;
		if (!this.sampleVoice.isPlaying)
		{
			flag = true;
		}
		else if (this.nowPlaySample != chara)
		{
			flag = true;
		}
		if (!flag)
		{
			return;
		}
		this.sampleVoice.Stop();
		string text = "SystemVoice/VolCheck/VolCheck_";
		if (chara == Config.SAMPLE.HERO)
		{
			text += "M00";
		}
		else if (chara == Config.SAMPLE.KOUICHI)
		{
			text += "M01";
		}
		else if (chara >= Config.SAMPLE.RITSUKO)
		{
			string[] array = new string[]
			{
				"A",
				"B"
			};
			int num = (!GlobalData.flipflop) ? 0 : UnityEngine.Random.Range(0, 2);
			int num2 = chara - Config.SAMPLE.RITSUKO;
			HEROINE heroineID = (HEROINE)num2;
			if (GlobalData.PlayData != null)
			{
				num = ((!GlobalData.PlayData.IsHeroineFloped(heroineID)) ? 0 : 1);
			}
			string text2 = text;
			text = string.Concat(new string[]
			{
				text2,
				"F",
				num2.ToString("00"),
				"_",
				array[num]
			});
		}
		AudioClip audioClip = Resources.Load<AudioClip>(text);
		if (audioClip == null)
		{
			GlobalData.Debug_LogError("没有音频剪辑");
			return;
		}
		this.nowPlaySample = chara;
		this.UpdateVoice();
		this.sampleVoice.PlayOneShot(audioClip);
	}

	// Token: 0x06000A04 RID: 2564 RVA: 0x0003B75C File Offset: 0x0003995C
	public void UpdateFromShortCut()
	{
		if (this.showFocusUI != null && this.autoHideObstacle != null)
		{
			this.showFocusUI.SetValue(ConfigData.showFocusUI);
			this.autoHideObstacle.SetValue(ConfigData.autoHideObstacle);
		}
	}

	// Token: 0x040009D4 RID: 2516
	[SerializeField]
	private Toggle[] tabs = new Toggle[4];

	// Token: 0x040009D5 RID: 2517
	[SerializeField]
	private GameObject[] tabMains = new GameObject[4];

	// Token: 0x040009D6 RID: 2518
	[SerializeField]
	private Text detailText;

	// Token: 0x040009D7 RID: 2519
	[SerializeField]
	private InputSliderUI sliderOriginal;

	// Token: 0x040009D8 RID: 2520
	[SerializeField]
	private SwitchUI switchOriginal;

	// Token: 0x040009D9 RID: 2521
	[SerializeField]
	private DropDownUI dropdownOriginal;

	// Token: 0x040009DA RID: 2522
	[SerializeField]
	private ColorChangeButton colorChangeOriginal;

	// Token: 0x040009DB RID: 2523
	[SerializeField]
	private GameObject spaceOriginal;

	// Token: 0x040009DC RID: 2524
	private SwitchUI showFocusUI;

	// Token: 0x040009DD RID: 2525
	private DropDownUI centerDrgaAct;

	// Token: 0x040009DE RID: 2526
	private InputSliderUI cameraTurnSpeed;

	// Token: 0x040009DF RID: 2527
	private InputSliderUI cameraMoveSpeed;

	// Token: 0x040009E0 RID: 2528
	private InputSliderUI mouseSensitive;

	// Token: 0x040009E1 RID: 2529
	private SwitchUI mouseRevV;

	// Token: 0x040009E2 RID: 2530
	private SwitchUI mouseRevH;

	// Token: 0x040009E3 RID: 2531
	private SwitchUI dragLock;

	// Token: 0x040009E4 RID: 2532
	private InputSliderUI keySensitive;

	// Token: 0x040009E5 RID: 2533
	private SwitchUI keyRevV;

	// Token: 0x040009E6 RID: 2534
	private SwitchUI keyRevH;

	// Token: 0x040009E7 RID: 2535
	private InputSliderUI parse;

	// Token: 0x040009E8 RID: 2536
	private SwitchUI h_camReset_Position;

	// Token: 0x040009E9 RID: 2537
	private SwitchUI h_camReset_Style;

	// Token: 0x040009EA RID: 2538
	private SwitchUI showFPS;

	// Token: 0x040009EB RID: 2539
	private SwitchUI autoHideObstacle;

	// Token: 0x040009EC RID: 2540
	private SwitchUI showMob;

	// Token: 0x040009ED RID: 2541
	private SwitchUI showMirror;

	// Token: 0x040009EE RID: 2542
	private InputSliderUI backLight;

	// Token: 0x040009EF RID: 2543
	private ColorChangeButton maleColor;

	// Token: 0x040009F0 RID: 2544
	private SwitchUI customHighlight;

	// Token: 0x040009F1 RID: 2545
	private SwitchUI h_action_continue;

	// Token: 0x040009F2 RID: 2546
	private DropDownUI dropThumbsCacheSize;

	// Token: 0x040009F3 RID: 2547
	private DropDownUI dropFlavor;

	// Token: 0x040009F4 RID: 2548
	private SwitchUI switchEyeAdaptation;

	// Token: 0x040009F5 RID: 2549
	private InputSliderUI sliderExposureCompensation;

	// Token: 0x040009F6 RID: 2550
	private SwitchUI switchBloom;

	// Token: 0x040009F7 RID: 2551
	private InputSliderUI sliderBloom;

	// Token: 0x040009F8 RID: 2552
	private SwitchUI switchDirt;

	// Token: 0x040009F9 RID: 2553
	private SwitchUI switchVignette;

	// Token: 0x040009FA RID: 2554
	private InputSliderUI sliderVignette;

	// Token: 0x040009FB RID: 2555
	private SwitchUI switchNoise;

	// Token: 0x040009FC RID: 2556
	private InputSliderUI sliderNoise;

	// Token: 0x040009FD RID: 2557
	private SwitchUI switchSSAO;

	// Token: 0x040009FE RID: 2558
	private InputSliderUI sliderSSAOIntensity;

	// Token: 0x040009FF RID: 2559
	private InputSliderUI sliderSSAORadius;

	// Token: 0x04000A00 RID: 2560
	private SwitchUI switchDOF;

	// Token: 0x04000A01 RID: 2561
	private InputSliderUI sliderDOF;

	// Token: 0x04000A02 RID: 2562
	private InputSliderUI masterVol;

	// Token: 0x04000A03 RID: 2563
	private InputSliderUI bgmVol;

	// Token: 0x04000A04 RID: 2564
	private InputSliderUI seVol;

	// Token: 0x04000A05 RID: 2565
	private InputSliderUI hseVol;

	// Token: 0x04000A06 RID: 2566
	private InputSliderUI envVol;

	// Token: 0x04000A07 RID: 2567
	private InputSliderUI mobVol;

	// Token: 0x04000A08 RID: 2568
	private SwitchUI reverb;

	// Token: 0x04000A09 RID: 2569
	private InputSliderUI voiceAllVol;

	// Token: 0x04000A0A RID: 2570
	private InputSliderUI ritsukoVol;

	// Token: 0x04000A0B RID: 2571
	private InputSliderUI ritsukoPitch;

	// Token: 0x04000A0C RID: 2572
	private InputSliderUI akikoVol;

	// Token: 0x04000A0D RID: 2573
	private InputSliderUI akikoPitch;

	// Token: 0x04000A0E RID: 2574
	private InputSliderUI yukikoVol;

	// Token: 0x04000A0F RID: 2575
	private InputSliderUI yukikoPitch;

	// Token: 0x04000A10 RID: 2576
	private InputSliderUI marikoVol;

	// Token: 0x04000A11 RID: 2577
	private InputSliderUI marikoPitch;

	// Token: 0x04000A12 RID: 2578
	private InputSliderUI heroVol;

	// Token: 0x04000A13 RID: 2579
	private InputSliderUI heroPitch;

	// Token: 0x04000A14 RID: 2580
	private InputSliderUI kouichiVol;

	// Token: 0x04000A15 RID: 2581
	private InputSliderUI kouichiPitch;

	// Token: 0x04000A16 RID: 2582
	private GameControl gameCtrl;

	// Token: 0x04000A17 RID: 2583
	[SerializeField]
	private AudioSource sampleVoice;

	// Token: 0x04000A18 RID: 2584
	private Config.SAMPLE nowPlaySample;

	// Token: 0x04000A19 RID: 2585
	private ImageEffectConfigChanger imageEffectChanger;

	// Token: 0x04000A1A RID: 2586
	private IllusionCamera illusionCamera;

	// Token: 0x04000A1B RID: 2587
	private readonly int[] ThumbsCacheSizeList = new int[]
	{
		0,
		100,
		500,
		1000
	};

	// Token: 0x04000A1C RID: 2588
	private readonly string[] ThumbsCacheNameList = new string[]
	{
		"なし",
		"100MB",
		"500MB",
		"1GB"
	};

	// Token: 0x02000182 RID: 386
	private enum TAB
	{
		// Token: 0x04000A1F RID: 2591
		CAMERA,
		// Token: 0x04000A20 RID: 2592
		SHOW,
		// Token: 0x04000A21 RID: 2593
		POSTEFFECT,
		// Token: 0x04000A22 RID: 2594
		AUDIO,
		// Token: 0x04000A23 RID: 2595
		NUM
	}

	// Token: 0x02000183 RID: 387
	private enum SAMPLE
	{
		// Token: 0x04000A25 RID: 2597
		NONE = -1,
		// Token: 0x04000A26 RID: 2598
		HERO,
		// Token: 0x04000A27 RID: 2599
		KOUICHI,
		// Token: 0x04000A28 RID: 2600
		MOB,
		// Token: 0x04000A29 RID: 2601
		RITSUKO,
		// Token: 0x04000A2A RID: 2602
		AKIKO,
		// Token: 0x04000A2B RID: 2603
		YUKIKO,
		// Token: 0x04000A2C RID: 2604
		MARIKO
	}
}
